The entire contents of Japanese Patent Application No. 9-235697 filed on Sep. 1, 1997 are incorporated herein by reference.
The present invention relates to a computer system and, more particularly to a power-supply control management of a computer system.
As microcomputer technology advances, various types of portable computers are developed at present. They are designed to be driven by batteries. The higher the performance of the CPU used in a portable computer, the greater the power consumption of the portable computer. The greater the power consumption, the harder it will be to lengthen the time the computer can be battery-driven. Various attempts have been made to save power in portable computers.
A portable computer has been developed which has a power-management (APM) driver provided between the BIOS (Basic Input and Output System) and the OS (Operating System). The APM driver is designed to control the power supply in the portable computer.
To achieve power-supply management (APM), the OS monitors the idle state of the CPU and the BIOS and hardware monitor the peripheral devices. The BIOS controls the CPU clock (either reducing the clock speed or stopping the clock) or stops the supply of power to the peripheral devices of the computer system. (Hereinafter, an OS having the conventional functions will be referred to as xe2x80x9clegacy OS,xe2x80x9d and PC hardware having the conventional functions will be referred to as xe2x80x9clegacy hardware.xe2x80x9d)
Since the BIOS needs to achieve the power management in the computer system, the BIOS codes are complex. That is, the BIOS prepares the guideline of power management.
Recently, Microsoft of the U.S. has proposed a new power management function called xe2x80x9cOnNowxe2x80x9d for use in personal computers. OnNow sets a power-management function in the operating system (OS) of a personal computer. OnNow performs management on all power-management data items, including the execution requests supplied from the application software, the wakeup requests issued by the peripheral devices, the request issued when the temperature in the personal computer rises above a predetermined value, the data representing the amount of power remaining in the battery and the voltages of the terminals, and the timer data for use in detecting the idling state of the CPU. An advanced configuration and power interface (ACPI) is provided between the OS and the BIOS to implement OnNow. The OS can acquire the power-management data items from the BIOS through the ACPI.
Therefore, the integrated power management can be accomplished in the OS. The BIOS no longer needs to detect whether or not the CPU is idling. The function of the CPU is now thereby simplified. The OS which can perform integrated power management shall be hereinafter referred to as xe2x80x9cOSPM (Operating System Directed Power Management System).xe2x80x9d
For implementation of an OSPM, the ACPI demands the legacy hardware have additional registers of several types. The ACPI must perform all power management functions, including sleep control, the power supply switch control, and the like, by means of hardware only, in accordance with the statuses set in the additional registers. The ACPI-implementing hardware inevitably becomes complicated. This is indeed a problem.
The object of the present invention is to provide a computer system in which the power management is accomplished by a hardware simulation (software) function performed before and after statuses are set in the registers dedicated to the ACPI, and in which the ACPI-implementing hardware is thereby reduced to a minimum.
A computer system according to the invention comprises has an operating system (OS) which incorporates a power management function. The system comprises: a central processing unit; a register for storing a sleep state instruction set by the operating system; and means for setting the computer system into a sleep state in a system management mode of the central processing unit.
If the conventional computer system is set into a sleep state by means of hardware only, it is necessary to implement dedicated hardware in the system for setting the system into a plurality of sleep states. Such hardware need not be implemented in the computer system according to the present invention, because the system can be set into each sleep state requested by the OS, in the system management mode of the central processing unit.
A computer system of another type, according to the present invention has an operating system (OS) incorporating a power management function. This system comprises: a central processing unit; first means for receiving a wakeup factor of the computer system; a register for storing data representing that a wakeup factor has been generated, thereby to inform the operating system of a power management event; and second means for setting the wakeup factor in the register when the first means receives the wakeup factor, in a system management mode of the central processing unit.
In the conventional computer system, hardware items must be implemented to manage various power management events, each for one power management event. Such hardware items need not be used in the computer system according to the present invention, because the wakeup factor can be set in the ACPI register by software routines, while the central processing unit is operating in system management mode.
A computer system of still another type, according to the invention has an operating system incorporating a power management function. The computer system comprises: a central processing unit; a register for storing data representing that a power management event has occurred, thereby to inform the operating system of the power management event; means for setting a value in a register assigned to the event, before the operating system is informed of the event, while the central processing unit is operating in system management mode.
Since the operating system is informed of a power management event, if any, after the value is set in the register assigned to the event while the central processing unit is operating in system management mode, it is easy for the OS to determine the power management event.
As described above, the present invention can provide a computer system in which the power management is achieved before and after statuses are set in the registers dedicated to the ACPI by means of hardware simulation (software), minimizing the hardware required for the ACPI.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.